name: "Release Pipeline Labeler"
on:
  issues:
    types: [closed, reopened]
  repository_dispatch:
    types: [released-insider]

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Actions
        uses: actions/checkout@v4
        with:
          repository: "microsoft/vscode-github-triage-actions"
          ref: stable
          path: ./actions
      - name: Checkout Repo
        if: github.event_name != 'issues'
        uses: actions/checkout@v4
        with:
          path: ./repo
          fetch-depth: 0
      - name: Install Actions
        run: npm install --production --prefix ./actions
      - name: "Run Release Pipeline Labeler"
        uses: ./actions/release-pipeline
        with:
          token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
          appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
          notYetReleasedLabel: unreleased
          insidersReleasedLabel: insiders-released
